package com.coco.controller;

import com.coco.model.MenuDetail;
import com.coco.service.ManagerService;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author GHOSTLaycoo
 * @date 2020/3/14 0014 - 下午 17:47
 */
@RestController
@RequestMapping("/menus")
@Slf4j
public class ManagerController {

    @Autowired
    private ManagerService managerService;

    @ApiOperation(value = "获取菜单下拉框数据")
    @GetMapping("")
    public List<MenuDetail> selectMenu(){
        List<MenuDetail> menuDetail = managerService.selectMenu();
        return menuDetail;
    }
}
